import { ApiProperty } from '@midwayjs/swagger'

/**
 * 树节点结果
 */
export class TreeNodeVO implements ITreeNode {
  @ApiProperty({ description: '标题' })
  title: string

  @ApiProperty({ description: '标识' })
  key: string

  @ApiProperty({ description: '父标识' })
  parentKey?: string

  @ApiProperty({ description: '子级', type: [TreeNodeVO] })
  children?: ITreeNode[]
}
